Repository navigation
Conversation
…ith its cache disabled
|
| - uses: SonarSource/mise-action-wrapper@058f4c006a2dd0dc3152f37d019bae6c65093b59 # 2.2.0 | ||
| if: steps.config-npm-completed.outputs.skip != 'true' | ||
| with: | ||
| version: 2026.10.17 | ||
| cache: false |
There was a problem hiding this comment.
⚠️ Bug: Wrapper overwrites custom ARTIFACTORY_READER_ROLE before the Vault step
The setup step works out ARTIFACTORY_READER_ROLE from the artifactory-reader-role input and writes it to GITHUB_ENV (config-npm line 82; config-poetry line 89 and config-uv line 90 do the same). The new SonarSource/mise-action-wrapper step comes next, and it receives only cache: false. The wrapper's action.yaml at 2.2.0 has a 'Set Artifactory reader role' step. That step reads only its own artifactory_reader_role input, which is empty here. It falls back to public-reader or private-reader based on repository visibility and writes that value to GITHUB_ENV. This replaces the caller's role.
The action's own vault-action-wrapper step runs after that and builds its secret path from env.ARTIFACTORY_READER_ROLE. So when a caller sets a custom artifactory-reader-role, the role is now silently ignored. The npm, poetry or uv credentials are fetched for the default role, and the Vault lookup or later Artifactory access can fail. The overwritten value also stays in the job env after the config action finishes. Before this PR, step-security/mise-action did not touch this variable.
Related: the wrapper also runs with its defaults repox_url=https://repox.jfrog.io and vault_url=https://vault.sonar.build, so the action's repox-url selection (Edge on self-hosted runners, the dev Vault for .dev.sonar.build) is not applied to the wrapper's own Vault/Repox calls.
Pass the resolved role (and the Repox/Vault endpoints) to the wrapper so it writes back the same value (same change in config-poetry and config-uv).:
- uses: SonarSource/mise-action-wrapper@058f4c006a2dd0dc3152f37d019bae6c65093b59 # 2.2.0
if: steps.config-npm-completed.outputs.skip != 'true'
with:
cache: false
artifactory_reader_role: ${{ env.ARTIFACTORY_READER_ROLE }}
repox_url: ${{ inputs.repox-url }}
vault_url: ${{ contains(inputs.repox-url, '.dev.sonar.build') && 'https://vault.dev.sonar.build' || 'https://vault.sonar.build' }}
Was this helpful? React with 👍 / 👎
Code Review
|
| Auto-apply | Compact | Unblock |
|
|
|
Was this helpful? React with 👍 / 👎 | Gitar
|
Closing: the failure only reproduced on the unmaintained v1 line. Validation on v2 with mise-action-wrapper 2.2.0 passed cold and warm (both caches restored), so this cleanup is not needed. Repositories still on v1 should move to v2. |



What
config-poetry,config-uvandconfig-npminstall their helper tools (jfrog-cli, plusjqfor npm) throughSonarSource/mise-action-wrapper2.2.0 withcache: false, instead of callingstep-security/mise-actiondirectly.spec/mise-cache-owner_spec.shnow asserts that each action's mise step is the SHA-pinned wrapper withcache: falseand that no directstep-security/mise-actionstep remains. Theversion: 2026.10.17pin is removed from the three actions: the wrapper pins mise itself.Why
When a job installs the caller's tools first (wrapper, cache restored into the mise data directory) and then calls
config-*, the old direct step restored its defaultmise-v1-...cache over the same directory. The older tarball overwrote files with the same name and kept the others (mixed Poetry/filelockfiles in one run), and replaced the pinnedmisebinary with the older one.One cache must own the mise data directory. The wrapper's cache also stores the whole data directory, so a second wrapper cache entry in
config-*would recreate the problem: the call usescache: false. Withcache: falsethe wrapper still configures Vault and Repox, and installs with a pinned mise, so there is a single mise version pin (bumped by Renovate in the wrapper) and no binary swap.Design choices and rejected alternatives
cache: falserather thancache: falseon the direct step (previous version of this PR): that fixes the double restore but keeps a second, separately pinned mise version that swaps the binary after the caller's step.cache_key_prefixon the wrapper: still extracts a second tarball over a live install.filelock: hides one package only.step-security/mise-actiondirectly: rejected for the above.# 2.2.0comment, as other actions in this repo.config-*stay: they support Edge URLs and the dev Vault, which the wrapper does not.config-*: none became redundant.Impact on other workloads
config-*: mise is now 2026.11.7 (wrapper pin) instead of 2026.10.17 after the step.jfrog-cli2.115.0 andjq1.8.1 install fine on it (validation below).PIP_INDEX_URL,UV_DEFAULT_INDEX,MISE_PIPX_REGISTRY_URL,MISE_BACKENDS_POETRY,MISE_URL_REPLACEMENTS) and appends to~/.netrcand~/.npmrc. Callers that already use the wrapper get the same values; callers that did not now get mise backends resolved through Repox in later mise steps.https://repox.jfrog.io);config-*on Edge (repox-urlset to an Edge URL, self-hosted runners) still fetches its own Edge credentials afterwards, but the mise step itself now needs Vault and SaaS Repox access from that runner. Not exercised in validation.build-*actions still run their own mise step with its cache; that step runs beforeconfig-*and no second cache lands on top of it.Cost
No new infrastructure. A few seconds per call (cache restore replaced by a small install). No measurable monthly change.
Rollback
Revert the commits of this PR; behavior returns to the direct step with the cache.
Follow-ups
build-poetry,build-npm,build-yarn,promote,update-release-channel: move to the wrapper (single owner), not changed here.config-*if the wrapper gains Edge support.v1branch is not maintained (backport PR closed).Validation
Throwaway workflow in
SonarSource/sonar-scanner-python: cold wrapper key per run (uniquecache_key_prefix), caller wrapper old (mise 2026.10.2) or 2.2.0, thenconfig-poetryfrommaster(control) or this branch. Run: https://github.com/SonarSource/sonar-scanner-python/actions/runs/47363606530master:Cache hit for: mise-v1-linux-x64-ubuntu24-2026.10.17-...,mise cache restored from key: mise-v1-...;mise --versionafterconfig-poetry: 2026.10.17 (caller's 2026.10.2 or 2026.11.7 replaced).Configure poetryandpoetry version -spass: the currentmise-v1entry is no longer stale, so the master line alone does not reproduce the broken tree.mise-v1restore;Configure poetrysucceeds;poetry --versionprints 2.2.1 andpoetry version -ssucceeds;mise --versionafterconfig-poetry: 2026.11.7 (the wrapper pin).v1line, now unmaintained, reproduced the failure (run 47352342672).shellspec spec/mise-cache-owner_spec.shfails on master actions and passes here;pre-commit run --all-filespasses.